package com.ly.heart.domain;

import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ly.common.core.domain.BaseVo;
import lombok.Data;
import lombok.experimental.Accessors;
import com.ly.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 采购合同;1:采购;2:行政;对象 erp_contract_procure_info
 * @author wutao
 * @date 2024-05-31
 */
@TableName ("erp_contract_procure_info")
@ApiModel (value = "采购合同;1:采购;2:行政;", description = "采购合同;1:采购;2:行政;")
@Data
@Accessors (chain = true)
public class ContractProcureEntity extends BaseVo {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId (value = "id", type = IdType.INPUT)
    private String id;

    /**
     * 需求子公司,关联部门表,level为1
     */
    @ApiModelProperty ("需求组织")
    @TableField ("dept_id")
    @Excel (name = "需求组织")
    private String requireDept;

    @ApiModelProperty ("收料组织")
    @TableField ("receiving_materials_company_id")
    @Excel (name = "收料组织,关联部门表,level为1")
    private String receivingDept;

    @ApiModelProperty ("结算组织")
    @TableField ("settlement_company_id")
    @Excel (name = "结算组织")
    private String settlementDept;

    @ApiModelProperty ("采购部门，level为2")
    @TableField ("procure_dept_id")
    @Excel (name = "采购部门")
    private String procureDeptId;

    /**
     * 供应商Id
     */
    @ApiModelProperty ("供应商Id")
    @TableField ("supplier_id")
    @Excel (name = "供应商Id")
    private String supplierId;

    /**
     * 供应商Id
     */
    @ApiModelProperty ("父级合同Id，当合同变更时选择具体父合同进行变更")
    @TableField ("parent_id")
    @Excel (name = "父级合同Id")
    private String parentId;

    /**
     * 合同名称
     */
    @ApiModelProperty ("合同名称")
    @TableField ("contract_name")
    @Excel (name = "合同名称")
    private String contractName;

    /**
     * 合同编号
     */
    @ApiModelProperty ("合同编号")
    @TableField ("contract_number")
    @Excel (name = "合同编号")
    private String contractNumber;

    /**
     * 项目Id;采购用,行政不用
     */
    @ApiModelProperty ("项目Id;采购用,行政不用")
    @TableField ("project_id")
    @Excel (name = "项目Id;采购用,行政不用")
    private String projectId;

    /**
     * 签订日期
     */
    @ApiModelProperty ("签订日期")
    @TableField ("sign_time")
    @JsonFormat (pattern = "yyyy-MM-dd")
    @Excel (name = "签订日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date signTime;

    @ApiModelProperty ("开始日期")
    @TableField ("start_time")
    @JsonFormat (pattern = "yyyy-MM-dd")
    @Excel (name = "开始日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    @ApiModelProperty ("结束日期")
    @TableField ("end_time")
    @JsonFormat (pattern = "yyyy-MM-dd")
    @Excel (name = "签订日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /**
     * 付款方式,关联字典
     */
    @ApiModelProperty ("付款方式,关联字典")
    @TableField ("pay_type")
    @Excel (name = "付款方式,关联字典")
    private String payType;

    /**
     * 合同金额
     */
    @ApiModelProperty ("合同金额")
    @TableField ("money")
    @Excel (name = "合同金额")
    private String money;

    /**
     * 合同金额大写
     */
    @ApiModelProperty ("合同金额大写")
    @TableField ("money_upper")
    @Excel (name = "合同金额大写")
    private String moneyUpper;

    /**
     * 税率
     */
    @ApiModelProperty ("税率")
    @TableField ("tax_rate")
    @Excel (name = "税率")
    private String taxRate;

    /**
     * 不含税金额
     */
    @ApiModelProperty ("不含税金额")
    @TableField ("tax_money")
    @Excel (name = "不含税金额")
    private String taxMoney;

    /**
     * 保证金比例
     */
    @ApiModelProperty ("保证金比例")
    @TableField ("margin_rate")
    @Excel (name = "保证金比例")
    private String marginRate;

    /**
     * 保证金金额,合同金额*保证金比例
     */
    @ApiModelProperty ("保证金金额,合同金额*保证金比例")
    @TableField ("margin_money")
    @Excel (name = "保证金金额,合同金额*保证金比例")
    private String marginMoney;

    /**
     * 合同文本内容,关联合同模板
     */
    @ApiModelProperty ("关联合同模板Id")
    @TableField ("contract_temp_id")
    @Excel (name = "关联合同模板Id")
    private String contractTempId;

    /**
     * 合同文本内容,关联合同模板
     */
    @ApiModelProperty ("合同文本内容,关联合同模板")
    @TableField ("contract_content")
    @Excel (name = "合同文本内容,关联合同模板")
    private String contractContent;

    /**
     * 备注
     */
    @ApiModelProperty ("备注")
    @TableField ("remarks")
    @Excel (name = "备注")
    private String remarks;

    /**
     * 合同类型;1:采购;2:行政;
     */
    @ApiModelProperty ("采购合同类型；1：普通合同；2：框架合同；3：单价合同;")
    @TableField ("procure_type")
    @Excel (name = "采购合同类型;")
    private Integer procureType;

    /**
     * 签订日期
     */
    @ApiModelProperty ("有效期内，单据合同需要该字段")
    @TableField ("validity_time")
    @JsonFormat (pattern = "yyyy-MM-dd")
    @Excel (name = "有效期内", width = 30, dateFormat = "yyyy-MM-dd")
    private Date validityTime;

    /**
     * 合同类型;1:采购;2:行政;
     */
    @ApiModelProperty ("是否关闭，1：正常；2：关闭;")
    @TableField ("is_close")
    @Excel (name = "是否关闭")
    private Integer isClose;

    @ApiModelProperty ("是否作废，1：正常；2：作废;")
    @TableField ("is_cancel")
    @Excel (name = "是否关闭")
    private Integer isCancel;

    /**
     * 合同类型;1:采购;2:行政;
     */
    @ApiModelProperty ("是否是变更合同，1：是；2：否;前端不用处理该字段")
    @TableField ("is_change")
    @Excel (name = "是否是变更合同")
    private Integer isChange;

    @ApiModelProperty ("流程状态")
    @TableField ("state")
    private String state;

    @ApiModelProperty ("供货方，选择供应商时带过来")
    @TableField ("supplier_goods_id")
    private String supplierGoodsId;

    @ApiModelProperty ("供货方联系人")
    @TableField ("supplier_contact_id")
    private String supplierContactId;

    @ApiModelProperty ("联系人职务")
    @TableField ("contact_position")
    private String contactPosition;

    @ApiModelProperty ("联系人手机号")
    @TableField ("tel_phone")
    private String telPhone;

    @ApiModelProperty ("供货方地址")
    @TableField ("supplier_address")
    private String supplierAddress;

    @ApiModelProperty ("结算方，选择供应商时带过来")
    @TableField ("settlement_id")
    private String settlementId;

    @ApiModelProperty ("收款方，选择供应商时带过来")
    @TableField ("payable_id")
    private String payableId;

    @ApiModelProperty ("邮箱")
    @TableField ("email")
    private String email;

    @ApiModelProperty ("结算币别")
    @TableField ("settlement_currency_id")
    private String settlementCurrencyId;

    @ApiModelProperty ("定价时点，1：系统日期；2：单据日期")
    @TableField ("price_time_point")
    private Integer priceTimePoint;

    @ApiModelProperty ("本位币，默认人民币")
    @TableField ("standard_currency")
    private String standardCurrency;

    @ApiModelProperty ("付款条件，走接口")
    @TableField ("payment_terms")
    private String paymentTerms;

    @ApiModelProperty ("是否含税；1：是；2：否")
    @TableField ("is_include_tax")
    private Integer isIncludeTax;

    @ApiModelProperty ("是否价外税；1：是；2：否")
    @TableField ("is_extra_price_tax")
    private Integer isExtraPriceTax;

    @ApiModelProperty ("合同总金额本位币")
    @TableField ("total_amount_currency")
    private String totalAmountCurrency;

    @ApiModelProperty ("汇率类型")
    @TableField ("rate_type")
    private String rateType;

    @ApiModelProperty ("汇率")
    @TableField ("rate")
    private String rate;

    @ApiModelProperty ("创建人Id")
    @TableField ("create_by")
    private String createBy;

    @ApiModelProperty ("创建时间")
    @TableField ("create_time")
    private Date createTime;

    @ApiModelProperty ("更新人Id")
    @TableField ("update_by")
    private String updateBy;

    @ApiModelProperty ("更新时间")
    @TableField ("update_time")
    private Date updateTime;

    /**
     * 是否在用
     */
    @ApiModelProperty ("是否在用")
    @TableField ("is_used")
    @Excel (name = "是否在用")
    private Integer isUsed;

    @ApiModelProperty ("创建人姓名")
    @TableField (exist = false)
    private String createUser;

    @ApiModelProperty ("是否作废名称")
    @TableField (exist = false)
    private String isCancelName;

    @ApiModelProperty ("是否关闭名称")
    @TableField (exist = false)
    private String isCloseName;

    @TableField (exist = false)
    private String contractTempName;

    @TableField (exist = false)
    private List<FileEntity> fileEntities;

    @ApiModelProperty ("项目名称")
    @TableField (exist = false)
    private String projectName;

    @ApiModelProperty ("供应商名称")
    @TableField (exist = false)
    private String supplierName;

    @ApiModelProperty ("付款方式名称")
    @TableField (exist = false)
    private String payTypeName;

    @ApiModelProperty ("业务type")
    @TableField (exist = false)
    private String businessType;

    @ApiModelProperty ("流程模型id")
    @TableField (exist = false)
    private String modelId;

    @ApiModelProperty ("流程实例id")
    @TableField ("instance_id")
    private String instanceId;

    @ApiModelProperty ("物料名称")
    @TableField (exist = false)
    private String materialName;

    @ApiModelProperty ("物料编码")
    @TableField (exist = false)
    private String materialCode;

    @ApiModelProperty ("源物料明细Id")
    @TableField (exist = false)
    private String sourceMaterialDetailId;

    @ApiModelProperty ("结算币别名称")
    @TableField (exist = false)
    private String settlementCurrencyName;

    @ApiModelProperty ("采购部门名称")
    @TableField (exist = false)
    private String procureDeptName;

    @ApiModelProperty ("供货方名称")
    @TableField (exist = false)
    private String supplierGoodsName;

    @ApiModelProperty ("结算方名称")
    @TableField (exist = false)
    private String settlementName;

    @ApiModelProperty ("收款方名称")
    @TableField (exist = false)
    private String payableName;

    @ApiModelProperty ("本位币名称")
    @TableField (exist = false)
    private String standardCurrencyName;

    @ApiModelProperty ("付款条件名称")
    @TableField (exist = false)
    private String paymentTermsName;

    @ApiModelProperty ("需求组织名称")
    @TableField (exist = false)
    private String requireDeptName;

    @ApiModelProperty ("收料组织名称")
    @TableField (exist = false)
    private String receivingDeptName;

    @ApiModelProperty ("结算组织名称")
    @TableField (exist = false)
    @Excel (name = "结算组织")
    private String settlementDeptName;

    @ApiModelProperty ("供货方联系人名称")
    @TableField (exist = false)
    @Excel (name = "结算组织")
    private String supplierContactName;

}
